package com.universalInterface.lims_interface.vo.user;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import java.io.Serializable;

/**
 * @author Lx
 * @date 2023/12/20 15:20
 * @description 用户新增对象
 */
@Data
@Schema(name = "UserSaveVo", description = "用户新增对象")
public class UserSaveVo implements Serializable {

	private static final long serialVersionUID = 347854370342651670L;

	@NotBlank(message = "interfaceType不能为空")
	@Schema(description = "1表示硬件接口；2表示远程接口")
	private String interfaceType;

	@NotBlank(message = "form不能为空")
	@Schema(description = "1调试阶段，2试用阶段")
	private String form;

	@NotBlank(message = "用户名不能为空")
	@Schema(description = "用户名")
	private String userName;

	@NotBlank(message = "密码不能为空")
	@Pattern(regexp = "^(?=.*\\d)(?=.*[a-zA-Z])(?=.*[^\\da-zA-Z\\s]).{8,16}$", message = "密码必须包含大小写字母,特殊字符和数字，且长度不低于8位")
	@Schema(description = "密码")
	private String passWord;

	// @Schema(name = "labName", description = "实验室名称")
	// private String labName;

	@NotNull(message = "实验室id不能为null")
	@Schema(name = "labGuid", description = "实验室id")
	private Long labGuid;
}
